<!DOCTYPE html>
<html lang="en">
	<head>
    	<meta name="layout" content="main_mobile">
        <title>个人中心详情</title>       
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'user_center.css')}" type="text/css">
	    <link rel="stylesheet" type="text/css" href="${resource(dir: 'venobox', file: 'venobox.css')}" media="screen" />
	    
	    <script type="text/javascript" src="${resource(dir: 'js', file: 'jquery-1.10.2.js')}" ></script>  
	    <script src="/scfire/venobox/venobox.min.js"></script>
	    <script src="/scfire/js/jquery-migrate-1.2.1.min.js"></script>

	    <style>
	    li .btn-more {
		    text-align: center;
		    color: #666;
		    border: 1px solid #ddd;
		    background-color: #fafafa;
		    -webkit-border-radius: 5px;
		    -moz-border-radius: 5px;
		    border-radius: 5px;
		    line-height: 38px;
		}
		ul.trend-list > li{
		}
	    </style>
    </head>
<body>

	<section class="ui-container">

        <div class="ui-tab">
        
        	<ul class="ui-tab-nav ui-border-b">
                <li class="current">动态 </li>
                <li>捐赠  ${donatesTotal}</li>
                <li>发起 ${projectsTotal}</li>
            </ul>

            <ul class="ui-tab-content" style="width:300%">
            
                <!-- 项目动态TAB -->      	            		
       			<li>       			
	                 <ul class="trend-list" id="dynamic">                 
	       				<g:each in="${projectFeedBacks}" var="feedBack" status="i">		                    			                    	
	                       <li class="ui-border-tb">
	                           <g:link controller="project" action="projectDetail" params='[projectid:"${feedBack.project.id}"]'>
	                               <h3>${feedBack.project.name}</h3>
	                               <p><g:formatDate format="yyyy-MM-dd HH:mm" date="${feedBack.date}"/></p>
	                               <p>
	                               	${feedBack.text}
	                               </p>
	                               <div class="img-list">
	                               		<g:if test="${feedBack?.img3 }">
	                               			<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img1}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img1})"></span></a>
			                                <a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img2}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img2})"></span></a>
			                                <a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img3}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img3})"></span></a>
			                                <g:if test="${feedBack?.img4}">
			                               		<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img4}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img4})"></span></a>
			                              	 </g:if>
			                              	 <g:if test="${feedBack?.img5}">
			                               		<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img5}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img5})"></span></a>
			                              	 </g:if>
			                              	 <g:if test="${feedBack?.img6}">
			                               		<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img6}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img6})"></span></a>
			                              	 </g:if>
			                              	 <g:if test="${feedBack?.img7}">
			                               		<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img7}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img7})"></span></a>
			                              	 </g:if>
			                              	 <g:if test="${feedBack?.img8}">
			                               		<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img8}"><span class="size3" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img8})"></span></a>
			                              	 </g:if>
	                               		</g:if>
	                               		<g:elseif test="${feedBack?.img2 }">
		                               		<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img1}"><span class="size2" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img1})"></span></a>
				                            <a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img2}"><span class="size2" style="background-image:url(/scfire/project/imgRead?img=${feedBack.img2})"></span></a>
	                               		</g:elseif>
	                               		<g:elseif test="${feedBack?.img1 }">
	                               			<a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${feedBack.img1}"><img src="/scfire/project/imgRead?img=${feedBack.img1}" alt=""></a>
	                               		</g:elseif>
	                               </div>
	                           </g:link>
	                           <g:if test="${user?.id == feedBack?.member?.id }">
	                           		<a href = "##" onclick="deleteFeedBack('${feedBack.id}')">删除</a>
	                           </g:if>
	                       </li>		                        
	                   	</g:each>
	                   	<g:if test="${projectfeedbackTotal>projectFeedBacks?.size() }">
	                   	<li id='weekdynamic'><a href='javascript:;' class='btn-more' onclick='show("dynamic")'>点击加载更多</a></li>
	                   </g:if>
	                   <g:else>
	                   <li id='weekdynamic'><a href='javascript:;' class='btn-more' >已经到底了</a></li>
	                   </g:else>
	                 </ul>
             	</li>
             	   	
             	<!-- 捐赠TAB --> 
             	<li>
             		<ul class="p-list" id="myinit">
             			<g:each in="${donates}" var="donate">	
				            <li>
				                <a href="/scfire/project/projectDetail?projectid=${donate.project.id}">
				                    <div class="top" style="background-image:url(/scfire/project/imgRead?img=${donate.project.img})">
				                        <div class="h3-box"><h3>${donate.project.name}</h3></div>
				                        <div class="ui-progress">
				                            <span style="width:${donate.project.progress}%"></span>
				                        </div>
				                        <g:if test="${donate.project.verified=='pass'}">
						                	<div class="status">募集中</div>
						                </g:if>             
						                <g:elseif test="${donate.project.verified=='execute'}||${donate.project.verified=='expired'}">
						                	<div class="status yellow">已筹完</div>
						                </g:elseif>
<%--						                <g:elseif test="${donate.project.verified=='expired'}">--%>
<%--						                	<div class="status">已过期</div>--%>
<%--						                </g:elseif>--%>
						                <g:elseif test="${donate.project.verified=='over'}">
						                	<div class="status">已结束</div>
						                </g:elseif>
				                    </div>
				                    <div class="bottom">
				                        <div class="infos">
				                            <div class="infos-l">共<span class="num">${donate?.project?.donates?.size() }</span>人次捐助</div>
				                            <div class="infos-r">还差<span class="num"><g:formatNumber number="${donate?.project?.rest}" format="0.00"/></span>元</div>
				                        </div>
				                        <div class="infos">
				                            <div class="infos-l">
				                            	<g:formatDate format="yyyy-MM-dd" date="${donate.date}"/>
				                            </div>
					                        </div>
					                        <div class="infos big">
					                        	<g:if test="${donate?.donate_fee }">
					                        		<div class="infos-l">支持<span class="num"><g:formatNumber number="${donate?.donate_fee }" format="0.00"/></span>元</div>
					                        	</g:if>
					                        	<g:elseif test="${donate?.money }">
					                        		<div class="infos-l">支持<span class="num"><g:formatNumber number="${donate?.money }" format="0.00"/></span>元</div>
					                        	</g:elseif>
					                            <div class="infos-r">捐赠码: ${donate?.donateNoNew }
												</div>
					                        </div>		                        
				                        <div class="ui-btn-group">
				                        	<!--button class="ui-btn-lg">
				                              	  我要捐赠
				                            </button-->
				                        </div>
				                    </div>
				                </a>
				            </li>
			            </g:each>
			            <g:if test="${donatesTotal>donates?.size() }">
			              <li><a href='javascript:;' class='btn-more' id='weekinit' onclick='show("init")'>点击加载更多</a></li>
			            </g:if>
			            <g:else>
			              <li> <a href='javascript:;' class='btn-more' id='weekinit'>已经到底了</a></li>
			            </g:else>
			        </ul>
             	</li>            	
             	             	
             	<!-- 项目发起TAB --> 
             	<li>
             		<ul class="p-list" id="myproject">
             			<g:each in="${projects}" var="project">
				            <li>
				                <div>
				                    <a href="/scfire/project/projectDetail?projectid=${project.id}" class="top" style="background-image:url(/scfire/project/imgRead?img=${project.img})">
				                    
				                        <div class="h3-box"><h3>${project.name}</h3></div>
				                        <div class="ui-progress">
				                            <span style="width:${project.progress}%"></span>
				                        </div>
				                        <g:if test="${project.verified=='modify'}">
						                	<div class="status">待编辑</div>
						                </g:if>
						                <g:elseif test="${project.verified=='draft'}">
						                	<div class="status">草稿</div>
						                </g:elseif>
						                <g:elseif test="${project.verified=='wait'}">
						                	<div class="status">待审核</div>
						                </g:elseif>
						                <g:elseif test="${project.verified=='refuse'}">
						                	<div class="status">不通过</div>
						                </g:elseif>
						                <g:elseif test="${project.verified=='pass'}">
						                	<div class="status">募集中</div>
						                </g:elseif>                
						                <g:elseif test="${project.verified=='execute'}||${project.verified=='expired'}">
						                	<div class="status yellow">已筹完</div>
						                </g:elseif>
<%--						                <g:elseif test="${project.verified=='expired'}">--%>
<%--						                	<div class="status">已过期</div>--%>
<%--						                </g:elseif>--%>
						                <g:elseif test="${project.verified=='over'}">
						                	<div class="status yellow">已结项</div>
						                </g:elseif>
				                    </a>
				                    
				                    <div class="bottom">
				                        <div class="infos">
				                            <div class="infos-l">共<span class="num">${project?.donates?.size() }</span>次捐助</div>
				                            <div class="infos-r">还差<span class="num"><g:formatNumber number="${project?.rest}" format="0.00"/></span>元</div>
				                        </div>
				                        <div class="infos big">
				                            <div class="infos-l">已筹金额<span class="num"><g:formatNumber number="${project.realAmount}" format="0.00"/></span>元</div>
				                            <g:if test="${project.verified=='draft' ||project.verified=='modify'|| project.verified=='wait' ||project.donateTimelimit < 0}">
							                </g:if>
							                <g:else>
							                	<g:if test="${project?.endDate }">
				                            	<div class="infos-r">剩余天数<span class="num">${project.endDate - new Date()>0? project.endDate - new Date(): 0}</span>天</div>
				                            </g:if>
							                </g:else>
				                            </div>
				                        <div class="ui-btn-group">
				                        	<g:if test="${project.verified=='pass'||project.verified=='execute'}">
				                            	<button class="ui-btn-lg" onclick="feedback(${project.id})">反馈进展</button>
				                            </g:if>
				                            <g:if test="${project.verified=='draft'||project.verified=='pass'||project.verified=='modify'}">
				                            <g:if test="${project.projectDetail == null || project.projectDetail == ''}">
				                            	<button class="ui-btn-lg" onclick="editproject(${project.id})">编辑项目</button>
				                            </g:if>
				                            <g:else>
				                            	<button class="ui-btn-lg" disabled="disabled">(限电脑编辑)</button>
				                            </g:else>
				                            </g:if>				                            
				                            <g:if test="${project.verified=='draft'}">
							                	<button class="ui-btn-lg" onclick="deleteproject(${project.id})">删除项目</button>
							                </g:if>				                            
			                        	</div>
				                    </div>
				                </div>
				            </li>
				          </g:each>
				        <g:if test="${projectsTotal>projects?.size() }">
				        <li><a href='javascript:;' class='btn-more' id='weekup' onclick='show("myproject")'>点击加载更多</a></li>
			            </g:if>
			            <g:else>
			             <li><a href='javascript:;' class='btn-more' id='weekup'>已经到底了</a></li>
			            </g:else>
			        </ul>
             	</li>             	

            </ul>
        </div>
    </section>


	<script type="text/javascript">
	var tab;
	(function() {
        tab = new fz.Scroll('.ui-tab', {
            role: 'tab',
            autoplay: false,
            interval: 3000
        });

        /* 滑动开始前 */
        tab.on('beforeScrollStart', function(from, to) {
            // from 为当前页，to 为下一页
        })

        /* 滑动结束 */
        tab.on('scrollEnd', function(curPage) {
            // curPage 当前页
        });

        <%
			if(detail == 'mynews'){
		%>		
				goTab(1);
		<%
			}
	    %>
    
        <%
			if(detail == 'mydonate'){
		%>		
				goTab(2);
		<%
			}
        %>

        <%
		if(detail == 'myproject'){
		%>		
				goTab(3);
		<%
			}
	    %>
	    $('.venobox').venobox({
            numeratio: true,
            border: '20px'
        });
        $('.venoboxvid').venobox({
            bgcolor: '#000'
        });
        $('.venoboxframe').venobox({
            border: '6px'
        });
        $('.venoboxinline').venobox({
            framewidth: '300px',
            frameheight: '250px',
            border: '6px',
            bgcolor: '#f46f00'
        });
        $('.venoboxajax').venobox({
            border: '30px;',
            frameheight: '220px'
        });
    })();

	function goTab (n) {
        var c = $('.ui-tab-content'), lis = $('.ui-tab-content > li');
        var newX = 0 - c.width() / lis.length * (n - 1);
        
        if (n >= 0 && n <= lis.length) {
            $('.ui-tab-nav > li').eq(n - 1).addClass('current').siblings().removeClass('current');
            lis.eq(n - 1).addClass('current').css('height', 'auto').siblings().removeClass('current').css('height', '0');
            tab.scrollTo(newX, 0);
            tab.currentPage = n - 1;
        }
    }

    function feedback(id){
    	window.location.href = "/scfire/project/projectFeedbackShow?projectid="+id;
    }

    function editproject(id){
    	window.location.href = "/scfire/project/edit?projectid="+id;
    }

    function deleteproject(id){
    	window.location.href = "/scfire/project/delete?id="+id+"&delopt=own";
    }

	function deleteFeedBack(id){
		if(window.confirm('确认要删除该反馈进展吗？')){
			var url = "/scfire/user/deleteProjectFeedBack";
			$.ajax({
	            type: "post",
	            url: url,
	            async :　false,
	            data: {id : id},
	            dataType: "json",
	            success: function(data){
	                alert(data.info);
	                window.location.href = "/scfire/user/userCenterDetail";
	            },
	            error : function (data){
					alert(data);
	            }
			});
            return true;
         }else{
            //alert("取消");
            return false;
        }
		
	}
	var userid = ${user.id}
    var finalOffset= 20
	var initoffset = 0
	var dynamicoffset = 0
	var upoffset = 0
	var initendFlag = false 
	var dynamicendFlag = false 		
	var upendFlag = false 		  
    function show(type){
	    if(type=="init"){//捐赠
	      ajaxReadinit(); 
	    }else if(type=="dynamic"){//动态
	       ajaxReaddynamic();
	    }else if(type=="myproject"){//发起
	       ajaxReadup();
	    }
    }
    
    function ajaxReadup(){
        if(upendFlag){
	       $("#weekup").html('已经到底了');
		   return
	   }
        upoffset +=finalOffset
        var html="";  
    	$.ajax({  
            type:'get',  
            dataType:'json',
            url:'/scfire/user/userCenterDetail?detail=myproject&format=json&offset='+ upoffset,  		           
            beforeSend:function(){console.log('loading...');$("#weekup").html('加载中...');},  
            success:function(data){
	          if(data.length<finalOffset){
	        	  upoffset -=3
	        	  upendFlag = true
	          }  
          	  $.each(data,function(i,item){
          		     html+="<li>"
            		 html+="<div>"
            		 html+="<a href='/scfire/project/projectDetail?projectid="+item.id+"' class='top' style='background-image:url(/scfire/project/imgRead?img="+item.img+")'>"
            		 html+="<div class='h3-box'><h3>"+item.name+"</h3></div>"
            		 html+="<div class='ui-progress'>"
            		 html+="<span style='width:"+item.progress+"%'></span>"
            		 html+="</div>"
                   if(item.verified=='modify'){
                  	 html+="<div class='status'>待编辑</div>"
                   }else if(item.verified=='draft'){
                  	 html+="<div class='status'>草稿</div>"
                   }else if(item.verified=='wait'){
                  	 html+="<div class='status'>待审核</div>"
                   }else if(item.verified=='refuse'){
                  	 html+="<div class='status'>不通过</div>"
                   }else if(item.verified=='pass'){
                  	 html+="<div class='status'>募集中</div>"
                   }else if(item.verified=='execute'||item.verified=='expired'){
                  	 html+="<div class='status yellow'>已筹完</div>"
                   }else if(item.verified=='over'){
                  	 html+="<div class='status yellow'>已结项</div>"
                   }
            		 html+="</a>"
            		 html+="<div class='bottom'>"
            		 html+="<div class='infos'>"
            		 html+="<div class='infos-l'>共<span class='num'>"+item.donates.length+"</span>次捐助</div>"
            		 html+="<div class='infos-r'>还差<span class='num'>"+item.rest.toFixed(2)+"</span>元</div>"
            		 html+="</div>"
            		 html+="<div class='infos big'>"
            		
            		 html+="<div class='infos-l'>已筹金额<span class='num'>"+item.realAmount.toFixed(2)+"</span>元</div>"
                   if(item.verified=='draft' ||item.verified=='modify'||item.verified=='wait' ||item.donateTimelimit < 0){}
                   else{
                    if(item.endDate){
                  	  html+="<div class='infos-r'>剩余天数<span class='num'>"+((item.endDate - new Date())>0? item.endDate - new Date(): 0)+"</span>天</div>"
                    }
                   }
                   html+="</div>"
                   html+="<div class='ui-btn-group'>"
                   if(item.verified=='pass'||item.verified=='execute'){
                  	 html+="<button class='ui-btn-lg' onclick='feedback(\""+item.id+"\")'>反馈进展</button>"
                   }
                   if(item.verified=='draft'||item.verified=='pass'||item.verified=='modify'){
                      if(item.projectDetail == null || item.projectDetail == ''){
                         html+="<button class='ui-btn-lg' onclick='editproject(\""+item.id+"\")'>编辑项目</button>"
                      }else{
                         html+="<button class='ui-btn-lg' disabled='disabled'>(限电脑编辑)</button>"
                      }
                   }		                            
                   if(item.verified=='draft'){
  			           html+="<button class='ui-btn-lg' onclick='deleteproject(\""+item.id+"\")'>删除项目</button>"
                   }	                            
                   html+="</div>"
                   html+="</div>"
                   html+="</div>"
                   html+="</li>"
          
          	  });
          	  
          	  html += "<li><a href='javascript:;' class='btn-more' id='weekup' onclick='show(\"myproject\")'>点击加载更多</a></li>"
	          $("#weekup").remove();
              $("#myproject").append($(html));

              if(upendFlag){
	            $("#weekup").html('已经到底了');
              } 
            },  
            complete:function(){console.log('mission complete.')} ,
            error:function(data){
          	  $("#weekup").html('已经到底了');
            }
           
      });  
    }
    
  function ajaxReaddynamic(){  
	  if(dynamicendFlag){
	    $("#weekdynamic").html('已经到底了');
		return
	   }
	   
	   dynamicoffset +=finalOffset
       var html="";  
       $.ajax({
            type:'get',  
            dataType:'json',
            url:'/scfire/user/userCenterDetail?detail=mynews&format=json&offset='+ dynamicoffset,  		           
            beforeSend:function(){console.log('loading...');$("#weekdynamic").html('加载中...');},  
            success:function(data){
	          if(data.length<finalOffset){
	        	  dynamicendFlag = true
	          }  
            $.each(data,function(i,item){
              html+= "<li class='ui-border-tb'>"
              html+= "<a href='/scfire/project/projectDetail?projectid="+item.projectid+"'>"
              html+= "<h3>"+item.projectname+"</h3>"
              html+= "<p>"+item.date+"</p>"
              html+= "<p>"+item.text
              html+= "</p>"
              html+= "<div class='img-list'>"
              if(item.img3!=null){
               html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img1+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img1+")'></span></a>"
               html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img2+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img2+")'></span></a>"
               html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img3+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img3+")'></span></a>"
               if(item.img4!=null){
                html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img4+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img4+")'></span></a>"
               }	
               if(item.img5!=null){
                html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img5+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img5+")'></span></a>"
               }
               if(item.img6!=null){
                html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img6+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img6+")'></span></a>"
               }
               if(item.img7!=null){
                html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img7+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img7+")'></span></a>"
               }
               if(item.img8!=null){
                html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img8+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img8+")'></span></a>"
               }
             }else if(item.img2!=null){
               html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img1+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img1+")'></span></a>"
	           html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img2+"'><span class='size3' style='background-image:url(/scfire/project/imgRead?img="+item.img2+")'></span></a>"
             }else if(item.img1!=null){
               html+= "<a class='venobox' data-gall='gall1' title='' href='/scfire/project/imgRead?img="+item.img1+"'><img src='/scfire/project/imgRead?img="+item.img1+"' alt=''></a>"
             }
             html+= "</div>"
             html+= "</a>"
             if(item.memberid==userid){
               html+= "<a href = '##' onclick='deleteFeedBack(\""+item.id+"\")'>删除</a>"
             }
             html+= "</li>"	
		   });
           html += "<li id='weekdynamic'><a href='javascript:;' class='btn-more'  onclick='show(\"dynamic\")'>点击加载更多</a></li>"
	       $("#weekdynamic").remove();
           $("#dynamic").append($(html));
           if(dynamicendFlag){
	         $("#weekdynamic").html('已经到底了');
             } 
          },  
       complete:function(){console.log('mission complete.')} ,
       error:function(data){
         $("#weekdynamic").html('已经到底了');
         }
    });
   }  
    
      
	function ajaxReadinit(){  
	  if(initendFlag){
	    $("#weekinit").html('已经到底了');
		return
	   }

    	initoffset +=finalOffset
        var html="";  
    	$.ajax({  
            type:'get',  
            dataType:'json',
            url:'/scfire/user/userCenterDetail?detail=mydonate&format=json&offset='+ initoffset,  		           
            beforeSend:function(){console.log('loading...');$("#weekinit").html('加载中...');},  
            success:function(data){
	          if(data.length<finalOffset){
	             initoffset -=3
	             initendFlag = true
	          }  
          	  $.each(data,function(i,item){
          	      html+="<li><a href='/scfire/project/projectDetail?projectid="+item.projectid+"'>"
			      html+="<div class='top' style='background-image:url(/scfire/project/imgRead?img="+item.projectimg+")'>"
			      html+="<div class='h3-box'><h3>"+item.projectname+"</h3></div>"
			      html+="<div class='ui-progress'><span style='width:"+item.projectprogress+"%'></span></div>"
				  if(item.projectverified == 'pass'){
		            html +="<div class='status'>募集中</div>"
			      }else if(item.projectverified == 'execute'||item.projectverified == 'expired'){
		            html +="<div class='status yellow'>已筹完</div>"
			      }else if(item.projectverified == 'over'){
		            html +="<div class='status yellow'>已结项</div>"
			      } 
			      html+= "</div>" 
			      html+="<div class='bottom'>"
			      html+="<div class='infos'>"
			      html+="<div class='infos-l'>共<span class='num'>"+item.donateNum +"</span>人次捐助</div>"
			      html+="<div class='infos-r'>还差<span class='num'>"+item.projectrest.toFixed(2)+"</span>元</div>"
			      html+="</div>"
			      html+="<div class='infos'>"
			      html+="<div class='infos-l'>"
			      html+= item.date
			      html+="</div>"
				  html+="</div>"
				  html+="<div class='infos big'>"
				  if(item.donate_fee!=null){
				     html+="<div class='infos-l'>支持<span class='num'>"+item.donate_fee.toFixed(2)+"</span>元</div>"
				  }else if(item.money!=null){
				     html+="<div class='infos-l'>支持<span class='num'>"+item.money.toFixed(2)+"</span>元</div>"				 
                  }
                  html+="<div class='infos-r'>捐赠码:"+ item.donateNoNew 
				  html+="</div>"
				  html+="</div>"                        
			      html+="<div class='ui-btn-group'>"
			      html+="</div>"
			      html+="</div>"
			      html+="</a>"
			      html+="</li>"
			      
          	  });
          	  
          	  html += "<li><a href='javascript:;' class='btn-more' id='weekinit' onclick='show(\"init\")'>点击加载更多</a></li>"
	          $("#weekinit").remove();
              $("#myinit").append($(html));

              if(initendFlag){
	            $("#weekinit").html('已经到底了');
              } 
            },  
            complete:function(){console.log('mission complete.')} ,
            error:function(data){
          	  $("#weekinit").html('已经到底了');
            }
           
      });  
    }  
 </script>
 

</body>
</html>